package com.runen.infinitemovement.adapter;

import android.content.Context;
import android.text.Html;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.runen.infinitemovement.R;
import com.runen.infinitemovement.model.entity.CommentDetailListBean;

public class MyDynamicStateCommentAdapter extends BaseQuickAdapter<CommentDetailListBean, BaseViewHolder> {
    private Context context;

    public MyDynamicStateCommentAdapter(Context context) {
        super(R.layout.item_my_dynamicstate_comment);
        this.context = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, CommentDetailListBean item) {
        TextView tv_comment = helper.getView(R.id.tv_comment);
        TextView tv_comment_user = helper.getView(R.id.tv_comment_user);
        String str = "<font color='#999999'>%s</font>";
        tv_comment.setText(Html.fromHtml(String.format(str, item.content)));
        tv_comment_user.setText(item.nickname + "：");
    }
}
